package com.ysstech.finance.entity;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 财务凭证模板信息表
 * </p>
 *
 * @author lishuangliang
 * @since 2021-03-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("fin_voucher_template")
public class VoucherTemplate extends Model<VoucherTemplate> {

    private static final long serialVersionUID = 1L;

    @TableId("ID")
    private String id;
    /**
     * 科目编码
     */
    @TableField("SUBJECT_ID")
    private String subjectId;

    /**
     * 顺序
     */
    @TableField("SEQUENCE")
    private Integer sequence;

    /**
     * 摘要
     */
    @TableField("REMARK")
    private String remark;

    /**
     * DR 借 CR 贷
     */
    @TableField("DRANDCR")
    private String drandcr;
    /**
     * 凭证来源
     */
    @TableField("SOURCE")
    private String source;

    /**
     * 凭证类型
     */
    @TableField("FTYPE")
    private String ftype;

    /**
     * 金额表达式
     */
    @TableField("MONEY_EXPRESSION")
    private String moneyExpression;
    /**
     * 数量表达式
     */
    @TableField("AMOUNT_EXPRESSION")
    private String amountExpression;

    /**
     * 条件表达式1
     */
    @TableField("CONDITION_COMMON")
    private String conditionCommon;

    /**
     * 条件表达式2
     */
    @TableField("CONDITION_PARAM")
    private String conditionParam;

    /**
     * 是否循环 1是 2否
     */
    @TableField("ISLOOP")
    private Integer isLoop;

    /**
     * 状态
     */
    @TableField("STATUS")
    private Integer status;
    /**
     * 添加时间
     */
    @TableField("ADD_TIME")
    private LocalDateTime addTime;

    /**
     * 添加用户
     */
    @TableField("ADD_USER")
    private String addUser;

    /**
     * 修改时间
     */
    @TableField("EDIT_TIME")
    private LocalDateTime editTime;

    /**
     * 修改用户
     */
    @TableField("EDIT_USER")
    private String editUser;
    /**
     * 删除原因
     */
    @TableField("DELETE_REASON")
    private String deleteReason;

    //核算方案名称
    @TableField(exist = false)
    private String projectName;

    @Override
    protected Serializable pkVal() {
        return null;
    }

    /**
     * 核算方案编码
     */
    @TableField(exist = false)
    private String projectId;

    /**
     * 科目编码
     */
    @TableField(exist = false)
    private String subjectCode;
    /**
     * 科目核算项编码
     */
    @TableField(exist = false)
    private String adjustCode;
    /**
     * 科目名称
     */
    @TableField(exist = false)
    private String subjectName;

    @TableField(exist = false)
    private List<String> listType;

}
